<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>九九乘法表</title>
    <script>
        var i; //定义行数
   var j; //定义列数
   document.write("<table align='center' cellspacing='0'>"); //使用table标签包裹住循环体

   for (i = 1;i <= 9;i++){ //循环9行

    document.write("<tr>") //使用tr包裹住一行
    for(j = 1;j <= i;j++){ //循环9列 j <= i时循环
        
        document.write("<td>");
        
        //输出“列*行=结果”
        document.write(j + "*" + i + "=" + i*j + "&nbsp;&nbsp;&nbsp;");

        document.write("</td>");
    }
    document.write("</tr>");
   }

  document.write("</table>");
    </script>
    <style>
        td{
	    border: blue solid 1px;
        }
    </style>
</head>
<body>
    
</body>
</html>